package com.ananjt.system.user.controller;


import com.ananjt.system.entity.SpMenu;
import com.ananjt.system.entity.SpRole;
import com.ananjt.system.entity.SpUser;
import com.ananjt.system.user.service.SpMenuService;
import com.ananjt.system.user.service.SpRoleService;
import com.ananjt.utils.context.CurrentUser;
import com.sp.system.user.core.utils.ContentResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenanhai
 * @since 2020-03-17
 */
@RestController
@RequestMapping("/spRole")
public class SpRoleController {

    private SpRoleService spRoleService;
    /**
     * 获取角色信息
     *
     * @param
     * @return
     */
    @PostMapping("/queryRoleList")
    public Object queryRoleList(SpUser spUser) {
        List<SpRole> menuList = spRoleService.list();
        return ContentResult.successResult(menuList, "获取角色列表");
    }

    @Autowired
    public void setSpRoleService(SpRoleService spRoleService) {
        this.spRoleService = spRoleService;
    }

}

